(function() {
  $(function() {
    var form;
    form = $('form.main');
    form.form({
      inline: true,
      fields: {
        name: 'empty',
        cron: 'empty',
        engine: 'empty',
        script: 'empty'
      }
    });
    return form.find('.trigger.button').click(function() {
      var $this;
      $this = $(this);
      $this.addClass('loading');
      return $.post('/sched/trigger', {
        serial: form.form('get value', 'serial')
      }, function(resp) {
        return $this.removeClass('loading');
      });
    });
  });

}).call(this);
